package com.csgc.camera.util
import com.csgc.camera.application.CameraApplication
import com.csgc.camera.storage.UserPreference
import com.hlyj.http.base.tool.lib_hlyj_base.BaseApplication
import com.tencent.vasdolly.helper.ChannelReaderUtil

object AppUtil {

    /**
     * 渠道号
     */
    fun getChannel():String{
        val channel = ChannelReaderUtil.getChannel(BaseApplication.instance.applicationContext)
        if (channel.isEmpty()){
            return "baidu"
        }
        return channel
    }

    fun isChannel003():Boolean{
        return getChannel() == "baidu"
    }

    //初始化是否显示广告
    var initAdStatus = true
    /**
     * 是否显示广告 true显示
     */
    fun canShowAd():Boolean{
        return initAdStatus && !UserPreference.instance.isVip()
    }
}